<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.0.0
 * @author	hikashop.com
 * @copyright	(C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><div class="iframedoc" id="iframedoc"></div>
<form onsubmit="if(document.getElementById('hikashop_default_image').value!='' || (document.getElementById('hikashop_watermark_image') && document.getElementById('hikashop_watermark_image').value!='')){document.getElementById('adminForm').enctype='multipart/form-data';}" action="index.php?option=<?php echo HIKASHOP_COMPONENT ?>&amp;ctrl=config" method="post"  name="adminForm" id="adminForm">
	<input type="hidden" name="option" value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="task" id="config_form_task" value="" />
	<input type="hidden" name="ctrl" value="config" />
	<?php echo JHTML::_( 'form.token' );

	$configTabs = array(
		'config_main' => array('MAIN', 'main'),
		'config_checkout' => array('CHECKOUT', 'checkout'),
		'config_files' => array('HIKA_FILES', 'files'),
		'config_mail' => array('HIKA_EMAIL', 'mail'),
		'config_display' => array('DISPLAY', 'display'),
		'config_plugins' => array('PLUGINS', 'plugins'),
		'config_languages' => array('LANGUAGES', 'languages'),
		'config_vote' => array('VOTE', 'vote')
	);

	if(hikashop_level(2)){
		$configTabs['config_acl'] = array('ACCESS_LEVEL', 'acl');
	}

	if(hikashop_level(1)){
		$configTabs['config_cron'] = array('CRON', 'cron');
		$configTabs['config_affiliate'] = array('AFFILIATE', 'affiliate');
	}

	$options = array(
		'startOffset' => $this->default_tab,
		'useCookie' => true
	);
	echo $this->tabs->start('config_tab', $options);
	foreach($configTabs as $pane => $paneOpt) {
		echo $this->tabs->panel(JText::_($paneOpt[0]), $pane);
		$this->setLayout($paneOpt[1]);
		echo $this->loadTemplate();
	}
	echo $this->tabs->end();

	?>
	<div style="clear:both;" class="clr"></div>

</form>
